<template>
	<view class="page">
		<view class="list_head">
			<view class="list_item" v-for="(item,index) in headData">
				<text>{{item.title}}</text>
				<image :src="item.url" mode=""></image>
			</view>
		</view>
		<view class="list" v-for="(item,index) in list" @tap="jumpDetail(item.id,item.status)">
			<view>{{item.id}}</view>
			<view>{{item.name}}</view>
			<view :style="{color:item.status==2?'#FF4E37':''}">
				{{item.status==1?'保修中':(item.status==2?'进行中':"已完成")}}
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "list_common",
		props: {
			list: Array
		},
		data() {

			return {
				headData: [{
					id: 1,
					title: "工单编号",
					url: ""
				}, {
					id: 2,
					title: "报单单位",
					url: "/static/img/icon2.png"
				}, {
					id: 3,
					title: "状态",
					url: "/static/img/icon2.png"
				}, ],

			};
		},
		methods:{
			jumpDetail(id,status){
				this.$parent.jumpDetailFa(id,status)
			}
		}
	}
</script>

<style lang="scss" scoped>
	.page {
		padding: 30rpx;
		box-sizing: border-box;
	}

	.list {
		display: flex;
		height: 114rpx;
		border-bottom: 2rpx solid #EFEFEF;

		view {
			display: inline-block;
			text-align: center;
			flex: 1;
			line-height: 114rpx;
			font-size: 28rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #474747;
		}

	}

	.list_head {
		display: flex;
		font-size: 28rpx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: #7F8084;
		line-height: 40rpx;


		.list_item {
			flex: 1;
			text-align: center;

			image {
				width: 20rpx;
				height: 14rpx;
				margin-left: 10rpx;
			}
		}
	}
</style>
